import {CanDeactivate} from '@angular/router';
import {ProductComponent} from '../product/product.component';

export class UnsaveGuard implements CanDeactivate<ProductComponent> {
  // 忽略部分参数和返回值
  canDeactivate(component: ProductComponent) {
    return confirm('确定离开？');
  }
}
